package com.forekenow.Demo8.Exercise.E9;

import java.util.Scanner;

public class Graduate implements StudentInterface,TeacherInterface {
   private String name;
   private String sex;
   private int age;
   private int fee;
   private int pay;


    public Graduate(String name, String sex,int age) {
        this.name = name;
        this.sex = sex;
        this.age = age;

    }

    @Override
    public void setFee(int fee) {
        this.fee=fee;
    }

    @Override
    public int getFee() {

        return fee;
    }

    @Override
    public void setPay(int pay) {
        this.pay =pay;
    }

    @Override
    public int getPay() {
       int total =  pay*12;
       if (total-pay!=2000){
           System.out.println("provide a loan");
       }
        return total;
    }
    public static void main(String[] args) {
        Graduate graduate = new Graduate("张三","男",23);
        System.out.println("请输入张三的学费");
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        graduate.setPay(a);
        System.out.println("请输入张三的工资");
        Scanner scanner1 = new Scanner(System.in);
        int b = scanner1.nextInt();
        graduate.setFee(b);
        int total = graduate.getPay();
        System.out.println("总工资"+total);
    }
}
